package ru.pb.game.network.engine.client.packets.sendable;

import ru.pb.game.network.engine.client.packets.GameServerToClientPacket;
import ru.pb.game.objects.model.clan.Clan;
import ru.pb.game.objects.model.players.Player;

/**
 * Пакет информации о клане
 * 
 * @author DarkSkeleton
 * @version 0.01 - (Italia)
 */
public class opcode_519_ACK extends GameServerToClientPacket
{
	private Player _p;
	private Clan _c;

	public opcode_519_ACK(Player p)
	{
		_p = p;
		_c = _p.getClan();
	}

	@Override
	public void writeImpl()
	{
		writeH(519); // opcode
		writeD(0); // if(значение > -1) то читаем дальше

		// 727 байт блок
		writeC(11); // может ранг
		writeC(1); // привилегии?
		writeH();
		if(_c != null)
			writeS(_c.getName(), 16);
		else
			writeB(new byte[16]);
		writeC();
		writeB(new byte[29]);
		writeS(getPlayer().getName(), 33); // Имя лидера клана
		writeS("CLAN TEST POINT BLANK", 255); // было подсчитано 60 байт но я не уверен там летит еще нули скорее всего максимум 255 байт - Заметки в клане и не только
		// 338

		writeB(new byte[389]);

		// db:02:19:05:00:00:00:00:11:01:00:00:44:52:65:61:6d:54:65:61:4d:00:00:00:00:00:00:00:00:06:1c:32:b5:dc:32:01:03:01:28:18:00:01:27:f4:04:00:00:00:00:00:1e:27:14:00:00:00:00:00:4b:41:4d:52:41:44:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:21:54:65:61:6d:20:53:70:65:61:6b:20:33:3a:0a:61:64:72:65:73:73:3a:20:74:73:2e:6d:61:78:6e:65:74:2e:75:61:0a:72:6f:6f:6d:3a:20:46:50:53:20:3e:20:50:6f:69:6e:74:20:42:6c:61:6e:6b:0a:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:54:65:6d:70:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:0f:c2:20:ea:eb:e0:ed:20:e1:f0:e0:f2:fc:20:f1:ee:20:f1:e2:ff:e7:fc:fe:20:e8:20:e7:ed:e0:ed:e8:e5:ec:20:f0:f3:f1:f1:ea:ee:e3:ee:20:ff:e7:fb:ea:e0:0a:54:65:61:6d:20:53:70:65:61:6b:20:33:3a:0a:61:64:72:65:73:73:3a:20:74:73:2e:6d:61:78:6e:65:74:2e:75:61:0a:72:6f:6f:6d:3a:20:46:50:53:20:3e:20:50:6f:69:6e:74:20:42:6c:61:6e:6b:0a:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:65:01:00:00:de:00:00:00:87:00:00:00:65:01:00:00:de:00:00:00:87:00:00:00:1e:27:14:00:00:00:00:00:1e:27:14:00:00:00:00:00:1e:27:14:00:00:00:00:00:1e:27:14:00:00:00:00:00:1e:27:14:00:00:00:00:00:1e:27:14:00:00:00:00:00:1e:27:14:00:00:00:00:00:1e:27:14:00:00:00:00:00:1e:27:14:00:00:00:00:00:1e:27:14:00:00:00:00:00:72:28:8f:44
	}
}